package com.bridge.client.bridgedynamcclient.custom_compinents;

import com.bridge.client.bridgedynamcclient.utils.FXMLUtil;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.DialogPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CommonDialogStage extends Dialog<Boolean> {
    protected Logger logger= LoggerFactory.getLogger(this.getClass());

    private final DialogPane dialogPane=new DialogPane();

    private final Text content=new Text();


    public CommonDialogStage(String title,String content){
        dialogPane.setHeaderText(title);
        this.content.setText(content);
        dialogPane.setContent(this.content);

        dialogPane.getButtonTypes().addAll(ButtonType.YES,ButtonType.NO);

        this.setTitle("提醒");
        this.setWidth(400);
        this.setHeight(400);
        this.setDialogPane(dialogPane);
        this.setResultConverter(buttonType -> {
            if(ButtonType.YES.equals(buttonType)){
                return true;
            }
            return false;
        });
        initialize();
    }

    private void initialize(){


    }

}
